import request from '@/router/axios';
import {
    baseUrl,
    mockUrl,
} from '@/config/env';

export const DIC = {
    REPAIR: 2,
    RATE: 3,
    STEPLIST: [{
            title: '已提交',
        },
        {
            title: '已受理',
        },
        {
            title: '已派单',
        },
        {
            title: '已维修',
        },
        {
            title: '已评价',
        },
    ],
};
export const addObj = form => request({
    url: `${baseUrl}/app/repairRecord/addOwner`,
    method: 'post',
    data: form,
});


export const rateObj = form => request({
    url: `${baseUrl}/app/repairRecord`,
    method: 'put',
    data: form,
});

export const repairObj = form => request({
    url: `${baseUrl}/app/repairRecord/repairAfter`,
    method: 'put',
    data: form,
});

export const getObj = id => request({
    url: `${baseUrl}/app/repairRecord/${id}`,
    method: 'get',
});

export const delObj = id => request({
    url: `${baseUrl}/app/repairRecord/${id}`,
    method: 'delete',
});

export const getList = query => request({
    url: `${baseUrl}/app/repairRecord/page`,
    method: 'get',
    params: query,
});